<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      >
    <h:head>
        <title>Complain</title>
        <h:outputStylesheet library="css" name="style.css"/>
        <h:outputStylesheet library="css" name="960.css"/>
        <h:outputStylesheet library="css" name="text.css"/>
        <h:outputStylesheet library="css" name="reset.css"/>
        <h:outputText value="#{complainProgess.createListAllComplain()}"/>        
        <h:outputText value="#{loginProgess.checkTechnician}"/>
    </h:head>
    <h:body>
        <h:form>
            <div id="body" class="container_12">
                <div id="header" class="grid_12">
                    <div id="logo" class="grid_4">
                        <a href="index.xhtml"><img src="image/logo.jpg" width="250" height="70" alt="ManTech-logo"/>
                        </a>
                    </div>
                    <div>
                        <div class="grid_2 alpha"><p><a href="technician.xhtml"><img src="image/buttonLinkHome.png" width="139" height="25" alt="buttonLinkHome"/></a></p></div>
                        <div class="grid_2"><p><h:commandLink action="#{newsProgess.doCreateNews()}"><img src="image/buttonLinkCreateNews.png" width="139" height="25" alt="buttonLinkCreateNews"/></h:commandLink></p></div>
                        <div class="grid_2"><p><a href="technician_receive.xhtml"><img src="image/buttonLinkRecevice.png" width="139" height="25" alt="buttonLinkRecevice"/></a></p></div>
                         <div class="grid_2 omega"><p><a href="contact_us.xhtml"><img src="image/buttonLinkContact.png" width="139" height="25" alt="buttonLinkContact"/></a></p></div>
                    </div>
                </div>
                <div id="main" class="container_12">
                    <div id="wrapper" class="grid_12">
                        <img src="image/wraper.jpg" width="100%" height="200px" alt="wrapper1"/>

                    </div>
                    <div id="content" class="grid_7 alpha suffix_2 ">
                        <h1 style="margin-left: 250px;">Complain</h1>
                        <p:dataTable style="width: 680px; height:100%; padding-left: 10px"
                                     paginator="true" rows="6"  
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     value="#{complainProgess.listAllComplain}" var="item">
                            <p:column sortBy="#{item.accountId.fullName}" headerText="FullName">
                                <f:facet name="header">
                                    <h:outputText value="FullName"/>
                                </f:facet>
                                <h:outputText value="#{item.accountId.fullName}"/>
                            </p:column> 
                            <p:column sortBy="#{item.title}" headerText="Title">
                                <f:facet name="header">
                                    <h:outputText value="Title"/>
                                </f:facet>
                                <h:commandLink action="#{complainProgess.showComplaintDetailTechnician(item)}" value="#{item.title}"/>
                            </p:column>
                            <p:column sortBy="#{item.date}" headerText="Date">
                                <f:facet name="header">
                                    <h:outputText value="Date"/>
                                </f:facet>
                                <h:outputText value="#{item.date}">
                                    <f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
                                </h:outputText>
                            </p:column>
                        </p:dataTable>
                    </div>
                    <div id="sidebar" class="grid_3 push_1">
                        <h:inputText class="txt"/>
                        <h:commandButton value="Search" class="btn"/>
                        <br/>
                        <br/>
                        <hr/>
                        <img src="image/#{loginProgess.image}" width="130px" height="130px" alt="admin"/>
                        <br/>
                        Welcome: #{loginProgess.user.fullName}
                        <br/>
                        Role :#{loginProgess.user.roleId.name}
                        <br/>
                        <h:commandButton value="Logout" action="#{loginProgess.doLogout()}"/>
                    </div>
                </div>
                <div id="footer" class="grid_12">
                    <p style="font-style: italic; text-align: center">ManTech HelpDesk 2013. Copyright© Group 2. </p>
                </div>
            </div>
        </h:form>
    </h:body>
</html>

